/**
 * ProducerServiceController.java
 *
 * @author: ZhuJiahui
 * @date: 2019/1/9 23:05
 */
package com.zhujiahui.sbkafka.second;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: ZhuJiahui
 * @version: 1.0
 */
@RestController
@RequestMapping("/sbkafka/second")
public class ProducerServiceController {

    @Autowired
    private ProducerServiceImpl producerServiceImpl;

    @RequestMapping(value = "/send", method = RequestMethod.GET)
    public String send(@RequestParam(value = "message") String message) {
        this.producerServiceImpl.sendJson("sbkafka", message);
        return message;
    }

}
